

#include "helper/iter/Iterator.h"

template<typename I>
class MyIterator : public helper::iter::Iterator<I>{
public:
  typedef I  Item;

  MyIterator(size_t start = 0, size_t end = 5)
  : _number(start)
  , _end(end)
  {
  }

  ~MyIterator() override {}
  
  std::optional<Item> next() override{
    if(_number < _end){
      return _number++ ;
    }
    return std::nullopt;
  }

private:
  size_t _number;
  size_t _end;
};
